import FrameLayout from '../layout'
import Login from '../views/login'
import Home from '../views/home'
import Commodity from '../views/commodity'
import Orders from '../views/orders'
import Financing from '../views/financing'
import Datas from '../views/datas'
import Settings from '../views/settings'

import {
    HomeOutlined,
    ShopFilled,
    ProfileFilled,
    AccountBookFilled,
    DiffFilled,
    SettingFilled
} from '@ant-design/icons'

const routes = [
    { path: '/login', component: Login },
    {
        path: '/',
        component: FrameLayout,
        children: [
            {
                path: '/home',
                component: Home,
                meta: {
                    title: '首页',
                    icon: HomeOutlined
                }
            },
            {
                path: '/commodity',
                component: Commodity,
                meta: {
                    title: '商品管理',
                    icon: ShopFilled
                }
            },
            {
                path:'/orders',
                component:Orders,
                meta:{
                    title:'订单管理',
                    icon: ProfileFilled
                }
            },
            {
                path:'/financing',
                component:Financing,
                meta:{
                    title:'财务管理',
                    icon: AccountBookFilled
                }
            },
            {
                path:'/datas',
                component:Datas,
                meta:{
                    title:'数据分析',
                    icon: DiffFilled
                }
            },
            {
                path:'/settings',
                component:Settings,
                meta:{
                    title:'系统设置',
                    icon: SettingFilled
                }
            }
        ]
    },
]

export default routes